<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="css/common.css"/>
		<link rel="stylesheet" type="text/css" href="css/register.css"/>
		<script src="js/jquery-3.0.0.min.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div class="register" id="register">
			<div class="haomaTitle" id="hmtitle"> 
				<div class="haoma-inner" id="haoma-inner">微信登陆</div> 
			</div>
			<form action="login.php" method="post" id="form">
				<label class="item" for="nick">昵称</label>
				<div id="nick_bg" class="bg_error"> 
					<input value="" type="text" class="new_txt" id="nick" name="nick" tabindex="6" style="z-index:0" maxlength="24" autocomplete="off">
				</div>
				<br />
				<br />
				<label class="item" for="pwd">密码</label>
				<div id="nick_bg" class="bg_error"> 
					<input value="" type="text" class="new_txt" id="pwd" name="pwd" tabindex="6" style="z-index:0" maxlength="24" autocomplete="off">
				</div>
				<br />
				<br />
				<label class="item" ></label>
				<input class="submit" type="button" value="立即登录"/>
				<br />
				<br />
				<a href="register.html" style="color: blueviolet;text-decoration: underline;float: right;">还没有账号？立即注册</a>
			</form>			
		</div>
	</body>
</html>
<script type="text/javascript">
	$('.submit').click(function(){
		var user = $('#nick').val();
		var pwd = $('#pwd').val();
		//alert(0);
		$.post('login.php',{
			user:user,
			pwd:pwd
		},function(data){
			//alert(data);
			if(data.success=='ok'){
				window.location.href = 'index.html';
			}
			else{
				alert('用户名或密码错了！');
			}
		},'json');
	});
</script>

